package org.easy.tool.service;

import org.easy.tool.entity.Knowledge;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Valley
 * @since 2024-09-04 22:51:14
 */
public interface IKnowledge extends IService<Knowledge> {

    /**
     * 新增知识点
     */
    LinkedHashMap submitKnowledge(LinkedHashMap data) throws Exception;

    /**
     * 递归查询所有孩子(不包括自己)
     */
    void getAllChildrenById(String id, List<Knowledge> children);

    /**
     * 递归查询所有孩子(包括自己)
     */
    List<String> getAllKnowledgeId(String id);

    /**
     * 筛选获取知识点列表
     */
    List<Knowledge> getKnowledgeList(LinkedHashMap data);

    Knowledge getKnowledgeByName(String name);

    Object getKnowledgeByPid(LinkedHashMap data);

    List<Knowledge> getKnowledgeListByPid(String pid);

    List<String> getKnowledgeIdListByPid(String pid);

    /**
     * 将知识点重新排序
     */
    Object sortKnowledge(LinkedHashMap data);

    Object getKnowledgeById(LinkedHashMap data);

    Object updateKnowledge(LinkedHashMap data);

    Object deleteKnowledge(LinkedHashMap data);

    Object hideKnowledge(LinkedHashMap data);

    Object restoreKnowledge(LinkedHashMap data);

    Object getKnowledgeNameList(LinkedHashMap data);
}
